/*
 * DemoPresenceListener.java
 *
 * Research In Motion Limited proprietary and confidential
 * Copyright Research In Motion Limited, 2011-2011
 */
package com.allkapps.bbmopenchat;


import net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContact;
import net.rim.blackberry.api.bbm.platform.profile.Presence;
import net.rim.blackberry.api.bbm.platform.profile.PresenceListener;
import net.rim.blackberry.api.bbm.platform.profile.UserProfile;
import net.rim.blackberry.api.bbm.platform.service.ContactListService;

/**
 * Responds to presence updates. This listener is registered with the
 * {@link net.rim.blackberry.api.bbm.platform.service.ContactListService ContactListService}.
 * <p>
 * One observation you may notice is that {@link Presence} is implemented by
 * {@link net.rim.blackberry.api.bbm.platform.profile.UserProfile UserProfile} and
 * {@link net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContact BBMPlatformContact}.
 * You may use this property to create common code to deal with both profiles and contacts.
 *
 *
 * @see {@link net.rim.blackberry.api.bbm.platform.service.ContactListService}
 */
public class BBMOpenChatPresenceListener implements PresenceListener {

    private ContactListService _contactListService;

    public BBMOpenChatPresenceListener() {
        _contactListService = BBMBridge.getInstance().getBBMPlatformContext().getContactListService();
        _contactListService.getContactList();
    }
    
    /* (non-Javadoc)
     * @see net.rim.blackberry.api.bbm.platform.profile.PresenceListener#contactUpdated(net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContact, int)
     */
    public void contactUpdated( BBMPlatformContact contact, int eventType ) {
    }

    /* (non-Javadoc)
     * @see net.rim.blackberry.api.bbm.platform.profile.PresenceListener#userUpdated(net.rim.blackberry.api.bbm.platform.profile.UserProfile, int)
     */
    public void userUpdated( UserProfile userProfile, int eventType ) {
    }

}
